
#import "PUMineHeadCell.h"

@implementation PUMineHeadCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self initViews];
    }
    return  self;
}
-(void)initViews{
    
    
    CGFloat height=190*KWidthScale;
//    self.bgImage=[[UIImageView alloc]init];
//    self.bgImage.frame=CGRectMake(0, 0, _window_width, height);
//    self.bgImage.image=[UIImage imageNamed:@"mine_BG"];
//    [self.contentView addSubview:self.bgImage];
    
    
    self.alphaView=[[UIView alloc]init];
    self.alphaView.frame=CGRectMake(0,0, _window_width, _window_width*0.16*2);
    [self.contentView addSubview:self.alphaView];
//    self.alphaView.userInteractionEnabled=YES;
    self.alphaView.backgroundColor=[UIColor clearColor];
    
    self.headImage=[[UIImageView alloc]init];
    self.headImage.frame=CGRectMake(_window_width/2-80*KWidthScale/2, 56*KWidthScale, 80*KWidthScale, 80*KWidthScale);
    self.headImage.image=[UIImage imageNamed:@"head"];
    self.headImage.layer.cornerRadius = self.headImage.frame.size.height/2;
    self.headImage.layer.masksToBounds=YES;
    self.headImage.layer.borderColor = [UIColor redColor].CGColor;
    self.headImage.layer.borderWidth = 1.0;
    [self.contentView addSubview:self.headImage];
    
    
    UIView *view=[[UIView alloc]init];
    view.backgroundColor=[UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.3000];
    view.frame=CGRectMake(0,55*KWidthScale,80*KWidthScale, 25*KWidthScale);
    [self.headImage addSubview:view];
    
    UILabel *lab=[[UILabel alloc]init];
    lab.text=@"修改";
    lab.textColor=[UIColor whiteColor];
    lab.textAlignment=NSTextAlignmentCenter;
    lab.frame=CGRectMake(0,55*KWidthScale,80*KWidthScale, 25*KWidthScale);
    lab.font=[UIFont systemFontOfSize:13];
    [self.headImage addSubview:lab];
    
    self.nameLab = [[UILabel alloc] init];
    self.nameLab.frame = CGRectMake(0,self.headImage.frame.origin.y+self.headImage.frame.size.height+12*KWidthScale, _window_width, 22*KWidthScale);
    self.nameLab.font=[UIFont boldSystemFontOfSize:17];
    self.nameLab.text=@"男用户页面";
    self.nameLab.textAlignment=NSTextAlignmentCenter;
    self.nameLab.textColor = [UIColor blackColor];
    [self.contentView addSubview:self.nameLab];
    
    self.IDLab = [[UILabel alloc] init];
    self.IDLab.frame = CGRectMake(0,self.nameLab.frame.origin.y+self.nameLab.frame.size.height+10*KWidthScale, _window_width, 20*KWidthScale);
    self.IDLab.font=[UIFont systemFontOfSize:15];
    self.IDLab.text=@"用户号：12345678";
    self.IDLab.textColor = [UIColor colorWithHex:0x999999];
    self.IDLab.textAlignment=NSTextAlignmentCenter;
    [self.contentView addSubview:self.IDLab];
    
    self.imageview=[[UIImageView alloc]init];
    self.imageview.image=[UIImage imageNamed:@"编辑"];
    self.imageview.userInteractionEnabled=YES;
    [self.contentView addSubview:self.imageview];
}

@end
